<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
        <meta name="description" content="">
        <meta name="author" content="">

        <title>Dashboard Template for Bootstrap</title>
        <!-- Bootstrap core CSS -->
        <link href="asserts/css/bootstrap.min.css" th:href="@{/webjars/bootstrap/4.0.0/css/bootstrap.css}" rel="stylesheet">

        <!-- Custom styles for this template -->
        <link href="asserts/css/dashboard.css" th:href="@{/asserts/css/dashboard.css}" rel="stylesheet">
        <style type="text/css">
            /* Chart.js */

            @-webkit-keyframes chartjs-render-animation {
                from {
                    opacity: 0.99
                }
                to {
                    opacity: 1
                }
            }

            @keyframes chartjs-render-animation {
                from {
                    opacity: 0.99
                }
                to {
                    opacity: 1
                }
            }

            .chartjs-render-monitor {
                -webkit-animation: chartjs-render-animation 0.001s;
                animation: chartjs-render-animation 0.001s;
            }
            table {
                width: 100%;
                height: 100%;
                border: 1px solid green;
                margin: auto;
                margin-top: 50px;
            }
        </style>
    </head>
</head>
<body bgcolor="#C7C7E2">

<div class="container-fluid">
    <div class="row">
        <main role="main" class="col-md-9 ml-sm-auto col-lg-10 pt-3 px-4" th:each="orderdetail:${orderdto.getOrderDetailList()}">
            <div class="col-md-4 column">
                <table class="table" >
                    <thead >
                    <tr><th>订单id</th>
                        <th>订单总金额</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr >
                        <td th:text="${orderdto.getOrderId()}"></td>
                        <td th:text="${orderdto.getOrderAmount()}"></td>
                        <td>
                            <a class="btn btn-sm btn-primary" th:href="@{/finish(id=${orderdetail.getOrderId()})}" >完结订单</a>
                        </td>
                        <td><a th:href="@{/lmh(username=${orderdto.getBuyerName()})}"> 返回主界面</a>
                        </td>
                    </tbody>
                </table>
            </div>
            <div class="col-md-12 column">
                <table class="table">
                    <thead>
                    <tr>
                        <th>商品id</th>
                        <th>商品名称</th>
                        <th>价格</th>
                        <th>数量</th>
                        <th>总额</th>
                    </tr>
                    </thead>
                    <tbody>
                    <tr>
                        <td th:text="${orderdetail.getProductId()}"></td>
                        <td th:text="${orderdetail.getProductName()}"></td>
                        <td th:text="${orderdetail.getProductPrice()}" ></td>
                        <td th:text="${orderdetail.getProductQuantity()}"></td>
                        <td th:text="${orderdetail.getProductPrice()*orderdetail.getProductQuantity()}"></td>
                    </tbody>
                </table>
            </div>
        </main>
        <form id="deleteEmpForm"  method="post">
            <input type="hidden" name="_method" value="delete"/>
        </form>
    </div>

</div>
</body>
</html>